﻿<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<title>:: Swift - Hospital Admin ::</title>
<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- Custom Css -->
<link href="assets/css/main.css" rel="stylesheet">
<link href="assets/css/login.css" rel="stylesheet">

<!-- Swift Themes. You can choose a theme from css/themes instead of get all themes -->
<link href="assets/css/themes/all-themes.css" rel="stylesheet" />
    <script src="https://lib.baomitu.com/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://lib.baomitu.com/layui/2.6.5/layui.min.js"></script>
    <link href="https://lib.baomitu.com/layui/2.6.5/css/layui.min.css" rel="stylesheet">

</head>
<body class="theme-cyan login-page authentication">

<div class="container">
    <div class="card-top"></div>
    <div class="card">
        <h1 class="title">Login <span class="msg"></span></h1>
        <div class="col-md-12">
            <form id="sign_in" method="POST">
                
                <div class="input-group"> <span class="input-group-addon"> <i class="zmdi zmdi-account"></i> </span>
                    <div class="form-line">
                        <input type="text" class="username form-control" name="username" placeholder="Username" required autofocus>
                    </div>
                </div>
                <div class="input-group"> <span class="input-group-addon"> <i class="zmdi zmdi-lock"></i> </span>
                    <div class="form-line">
                        <input type="password" class="password form-control" name="password" placeholder="Password" required>
                    </div>
                </div>
                <div>
                    <div class="">
                        <input type="checkbox" name="rememberme" id="rememberme" class="filled-in chk-col-pink">
                        <label for="rememberme">记住密码</label>
                    </div>
                    <div class="text-center">
                        <a href="#" class="login btn btn-raised waves-effect g-bg-cyan">登录</a>
                        <a href="sign-up.html" class="btn btn-raised waves-effect">注册账号</a>
                    </div>
                    <div class="text-center"> <a href="forgot-password.html">忘记密码?</a></div>
                </div>
            </form>
        </div>
    </div>    
</div>
<div class="theme-bg"></div>

<!-- Jquery Core Js --> 
<script src="assets/bundles/libscripts.bundle.js"></script> <!-- Lib Scripts Plugin Js -->
<script src="assets/bundles/vendorscripts.bundle.js"></script> <!-- Lib Scripts Plugin Js -->

<script src="assets/bundles/mainscripts.bundle.js"></script><!-- Custom Js -->
</body>
<script>
    $(function () {
        $.get("/loginout",function (date) {

        })


        $(".login").click(function () {
            var user=$(".username").val();
            var password=$(".password").val();

            $.get("/loginon?user="+user+"&password="+password,function (date) {

                if(date=="1"){


                    layer.open({
                        title:'提示'
                        ,content:'登录成功！！'
                        ,icon:1
                    })

                setTimeout(function () {
                    window.location.replace("/Client/index.html")

                },1000)
                }else if(date=="2"){
                    layer.open({
                        title:'提示'
                        ,content:'登录成功！！'
                        ,icon:1
                    })

                    setTimeout(function () {
                        window.location.replace("/ManagementEnd/index.html")
                    },1000)

                }else if(date=="3"){
                    layer.open({
                        title:'提示'
                        ,content:'登录成功！！'
                        ,icon:1
                    })

                    setTimeout(function () {
                        window.location.replace("/ManagementEnd/index-2.html")

                    },1000)

                }else if(date=="4"){
                    layer.open({
                        title:'提示'
                        ,content:'登录成功！！'
                        ,icon:1
                    })

                    setTimeout(function () {
                        window.location.replace("/ManagementEnd/index-3.html")


                    },1000)
                }else if(date=="0"){
                    layer.open({
                        title:'提示'
                        ,content:'账号或密码错误！！'
                        ,icon:2
                    })
                }

            })
        })

    })
</script>


</html>